package com.tuo51.foudation.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.*;

import javax.persistence.MappedSuperclass;
import javax.persistence.Version;

/**
 * *******************************
 * Created by Ron.
 * form com.tuo51
 * on 2017/5/23
 * 乐观锁对象domain
 * *******************************
 */
@MappedSuperclass
@ToString(callSuper = true, exclude = {"version"})
@EqualsAndHashCode(callSuper = true, exclude = {"version"})
public abstract class OptimisticLockDomain extends Domain{

    @JsonIgnore
    @Version
    @Getter(AccessLevel.PRIVATE)
    @Setter(AccessLevel.PRIVATE)
    private Long version;
}
